﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using EpsiRisk.MoteurJeu;

namespace EpsiRisk.AffichageJeu
{
    public class ClassZoneMission : ClassZone
    {

        private static Texture2D backgroundSprite;

        public ClassZoneMission()
        {
            position = new Vector2(100, -15);
            height = 50;
            width = 600;
            backcolor = Color.TransparentWhite;
        }

        internal override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);
            spriteBatch.Begin();
            spriteBatch.Draw(backgroundSprite, position, Color.White);
            spriteBatch.DrawString(ClassDonneesGlobales.SpriteTxt, stringMission, new Vector2(position.X + txtDecal, position.Y + 15), Color.Black);
            spriteBatch.End();
        }

        internal override void initialiser(Microsoft.Xna.Framework.Content.ContentManager content)
        {
            backgroundSprite = content.Load<Texture2D>("Sprites/SpriteZoneTop");
        }

        private string stringMission
        {
            get
            {
                if (ClassEtatPartie.modeMissions)
                {
                    return ClassEtatPartie.joueurCourant().mission.stringObjectif();
                }
                else
                {
                    return "Conquete du Monde";
                }
            }
        }
        private int txtDecal
        {
            get 
            {
                if (ClassEtatPartie.modeMissions)
                {
                    return 60;
                }
                else
                {
                    return 190;
                }
            }
        }
    }
}
